<?php
namespace app\apigovernment\Validate;

use think\Validate;

/**
 * 个人用户验证类
 */
class PersonageUserValidate extends Validate
{
    protected $rule = [
        'id' => 'require',
        'status' => 'require|in:1,2,3',
        'username' => 'require',
        'gender' => 'require|in:1,2',
        'mobile' => 'require',
        'unit_name' => 'require',
        'family_name' => 'require',
        'stoke_name' => 'require',
    ];
    protected $message = [
        'id.require'  => '信息未找到',
        'status.require'  => '审核状态未找到',
        'status.in'  => '审核状态未找到',
        'username.require'  => '姓名不能为空',
        'gender.require'  => '性别不能为空',
        'gender.in'  => '性别未知',
        'mobile.require'  => '手机号不能为空',
        'unit_name.require'  => '单位不能为空',
        'family_name.require'  => '科室不能为空',
        'stoke_name.require'  => '股市不能为空',
    ];
    protected $scene = [

        'save' => [
            'id',
            'status'
        ]
    ];
}